PreviousNextTracker indexSee it online !

(242/314) 3614962 - Classpath Plugin + jEdit Native2Ascii "ant test" target

I am trying to build jedit using jEdit's console plugin. So I run "ant" from the "build project" command.

When I do, the native2ascii test fails:
test:
Deleting directory /home/ezust/workspace/jedit/trunk/build/test/raw-reports
Created dir: /home/ezust/workspace/jedit/trunk/build/test/raw-reports
Running org.jedit.io.Native2ASCIIEncodingTest
Tests run: 108, Failures: 0, Errors: 13, Time elapsed: 0.113 sec
Test org.jedit.io.Native2ASCIIEncodingTest FAILED
Processing /home/ezust/workspace/jedit/trunk/build/test/merged-reports/TESTS-TestSuites.xml to /tmp/null1094608422
Loading stylesheet jar:file:/home/ezust/workspace/slackerdoc/lib/ant-junit-1.8.2.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
Transform time: 637ms
Deleting: /tmp/null1094608422

BUILD FAILED
/home/ezust/workspace/jedit/trunk/build.xml:432: Unit test(s) failed! See reports at /home/ezust/workspace/jedit/trunk/build/test/reports/index.html

Total time: 5 seconds
Process ant exited with code 1

it works fine when I use a regular shell prompt.

Submitted ezust - 2013-09-01 - 00:52:15z Assigned nobody
Priority 5 Category None
Status Open Group None
Resolution None Visibility No

Comments

2013-09-01 - 14:48:41z
ezust
changed the "test" from a dependency of build to an <antcall target="test"/> at the end of the target. That's a workaround but not a fix.
2013-09-01 - 17:09:10z
vampire0
Hm, this is really strange.
The 13 tests that use package private methods of the Test Subject in the Test Class do fail in that case with an IllegalAccessError.
But why is this the case if called through "Compile Project" or "Run Project"?
Anyway I think this is more a Console plugin bug than a build system bug, as it works just fine if you run "ant test" from the command line, or also from the Ant Integration of IntelliJ IDEA.
So I guess this should be moved to plugin bugs for Console plugin.
2013-09-01 - 17:43:03z
ezust
I don't think it is a bug in the console plugin, because we have the same problem when we tried to automate the build with jenkins.
2013-09-01 - 18:05:38z
vampire0
Acutally Console per-se works if I run "ant test" in the Console System shell.
If I start jEdit, open the System Console Shell, cd to the jEdit directory and run "ant test" everything works fine. (No PV Project existing)
As soon as I open the Project Viewer Dockable, still without any existing Project, "ant test" fails with those 13 failing tests.
According to "Activator" Dockable the "Loaded" / "Activated" state of all plugins does not change during this.
Jenkins could have the same bug or a similar one.
But if it works when calling the intended tool directly (Ant) then I don't think it is a bug in the build file that should be fixed or work-arounded in the build file.
2013-09-01 - 18:06:42z
ezust
I wonder if the Classpath plugin is doing something funky...
2013-09-01 - 18:09:59z
ezust
I uninstalled the classpath plugin and the problem goes away!
2013-09-01 - 18:14:23z
ezust
If I have classpath loaded, but un-check "include system classpath" in in the classpath plugin options, the problem goes away.
2013-09-01 - 18:27:11z
vampire0
Ah, nice pin-down. :-)

Attachments